<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    {% if market_id == 'index' or market_id == '0001' %}
        <title>超市后台管理系统-总部</title>
    {% else %}
        <title>超市后台管理系统-分部</title>
    {% endif %}
    <!-- Bootstrap Styles-->
    <link href="/static/sm_assets/css/bootstrap.css" rel="stylesheet" />
    <!-- FontAwesome Styles-->
    <link href="/static/sm_assets/css/font-awesome.css" rel="stylesheet" />
    <!-- Morris Chart Styles-->
    <link href="/static/sm_assets/js/morris/morris-0.4.3.min.css" rel="stylesheet" />
    <!-- Custom Styles-->
    <link href="/static/sm_assets/css/custom-styles.css" rel="stylesheet" />
    <!-- Google Fonts-->
    <link href='http://fonts.useso.com/css?family=Open+Sans' rel='stylesheet' type='text/css' />
    <!-- TABLE STYLES-->
    <link href="/static/sm_assets/js/dataTables/dataTables.bootstrap.css" rel="stylesheet" />
    <!-- Calendar CSS-->
    <link rel="stylesheet" href="/static/sm_assets/jquery-ui-datepicker/jquery-ui.min.css" type="text/css" />

</head>

<body>
    <div id="wrapper">
        <nav class="navbar navbar-default top-navbar" role="navigation">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".sidebar-collapse">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                {% if market_id == 'index' or market_id == '0001' %}
                    <a class="navbar-brand public-header" href="/seniorAdmin/">超市后台管理系统-总部</a>
                {% else %}
                    <a class="navbar-brand public-header" href="/sm_system/">超市后台管理系统-分部</a>
                {% endif %}
            </div>

            <ul class="nav navbar-top-links navbar-right">
                <li class="dropdown">
                    <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                        <i class="fa fa-user fa-fw"></i> <i class="fa fa-caret-down"></i>
                    </a>
                    <ul class="dropdown-menu dropdown-user">
                        <li class="divider"></li>
                        <li><a href="login.html"><i class="fa fa-sign-out fa-fw"></i> Logout</a>
                        </li>
                    </ul>
                    <!-- /.dropdown-user -->
                </li>
                <!-- /.dropdown -->
            </ul>
        </nav>
        <!--/. NAV TOP  -->
        <nav class="navbar-default navbar-side" role="navigation">
            <div class="sidebar-collapse">
                <!-- <ul class="nav" id="main-menu">

                    <li>
                        <a class="active-menu" href="shop.html"><i class="fa fa-dashboard"></i> 门店管理</a>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-sitemap"></i>商品管理<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li>
                                <a href="commodity.html">商品汇总信息</a>
                            </li>
                            <li>
                                <a href="commodity-kind.html">商品业种管理</a>
                            </li>
                            <li>
                                <a href="commodity-brand.html">商品品牌管理</a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="provider.html"><i class="fa fa-bar-chart-o"></i> 供应商汇总信息</a>
                    </li>
                    <li>
                        <a href="contract.html"><i class="fa fa-qrcode"></i> 合同汇总信息</a>
                    </li>

                    <li>
                        <a href="sale.html"><i class="fa fa-table"></i> 销售汇总信息</a>
                    </li>
                    <li>
                        <a href="#"><i class="fa fa-sitemap"></i> 会员管理<span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li>
                                <a href="vip">会员信息</a>
                            </li>
                            <li>
                                <a href="vipconsumption.html">会员消费明细</a>
                            </li>
                        </ul>
                    </li>

                    <li>
                        <a href="staff.html"><i class="fa fa-fw fa-file"></i> 职员管理</a>
                    </li>
                </ul> -->

            </div>
        </nav>
        <!-- /. NAV SIDE  -->

        <!-- /. NAV SIDE  -->
        <div id="page-wrapper">
            <div id="page-inner">

                <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-header">
                            {% if market_id == 'index' %}
                                销售信息 <small>所有门店销售记录</small>
                            {% elif market_id == '0001' %}
                                销售信息 <small>总店销售记录</small>
                            {% elif market_id == '0002' %}
                                销售信息 <small>门店1销售记录</small>
                            {% elif market_id == '0003' %}
                                销售信息 <small>门店2销售记录</small>
                            {% endif %}
                        </h1>
                    </div>
                </div>
                <!-- /. ROW  -->
                <div class="row">
                <div class="col-md-12">
                    <!-- Advanced Tables -->
                    <div class="panel panel-default">
                        <div class="panel-heading">
                             门店销售记录
                        </div>
                        <div class="panel-body">
                            <form action="/salesrecord/{{ market_id }}/" method="post">
                                <div class="table-responsive">
                                    <table class="table table-striped table-bordered table-hover" id="dataTables-example">

                                        <div class="row">
                                            <div class="col-sm-3">
                                                <label for="id">流水号</label>
                                                <input id="id" name="id" type="text" class="form-control" placeholder="输入流水号">
                                            </div>
                                            <div class="col-sm-2">
                                                <label for="commodity_id">商品编号</label>
                                                <input id="commodity_id" name="commodity_id" type="text" class="form-control" placeholder="输入商品编号">
                                            </div>
                                            <div class="col-sm-2">
                                                <label for="date">销售日期</label>
                                                <input id="date" name="date" type="text" autocomplete="off" data-large-mode="true" placeholder="选择日期" class="form-control">
                                            </div>
                                            <div class="col-sm-2">
                                                <label for="customer_id">会员编号</label>
                                                <input id="customer_id" name="customer_id" type="text" class="form-control" placeholder="输入会员编号">
                                            </div>
                                            {% if market_id == 'index' %}
                                                <div class="col-sm-2">
                                                    <label for="supermarket_id">门店</label>
                                                    <select id="supermarket_id" name="supermarket_id" class="form-control">
                                                        <option value="0000">选择门店</option>
                                                        <option value="0001">总店</option>
                                                        <option value="0002">门店1</option>
                                                        <option value="0003">门店2</option>
                                                    </select>
                                                </div>
                                            {% endif %}
                                            <div class="col-sm-1">
                                                <input type="submit" value="查 询" style="margin-top: 28px;">
                                            </div>
                                        </div>

                                        <br>
                                         <thead>
                                            <tr>
                                                <th>流水号</th>
                                                <th>商品编号</th>
                                                <th>购买数量</th>
                                                <th>销售时间</th>
                                                <th>会员编号</th>
                                                {% if market_id == 'index' %}
                                                <th>门店编号</th>
                                                {% endif %}
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {% for record in record_list %}
                                            <tr class="odd gradeX">
                                                <td>{{ record.id }}</td>
                                                <td>{{ record.commodity_id }}</td>
                                                <td>{{ record.amount }}</td>
                                                <td>{{ record.date }}</td>
                                                <td>{{ record.customer_id }}</td>
                                                {% if market_id == 'index' %}
                                                <td>{{ record.supermarket_id }}</td>
                                                {% endif %}
                                            </tr>
                                            {% endfor %}
                                        </tbody>
                                    </table>
                                </div>
                            </form>
                        </div>
                    </div>
                    <!--End Advanced Tables -->
                </div>
            </div>


                <!-- /. ROW  -->
                <footer><p>Copyright &copy; 2016.Company name All rights reserved.<a target="_blank" href="http://sc.chinaz.com/moban/">&#x7F51;&#x9875;&#x6A21;&#x677F;</a></p></footer>
            </div>
            <!-- /. PAGE INNER  -->
        </div>
        <!-- /. PAGE WRAPPER  -->
    </div>
    <div class="zhezhao" ></div>
    <div class="remove" id="removeProv">
        <div class="removerChid">
            <h2>提示</h2>
            <div class="removeMain">
                <p>你确定要删除该门店吗？</p>
                <a href="#" id="yes">确定</a>
                <a href="#" id="no">取消</a>
            </div>
        </div>
   </div>
    <!-- /. WRAPPER  -->
    <!-- JS Scripts-->
    <!-- jQuery Js -->
    <script src="/static/sm_assets/js/jquery-1.10.2.js"></script>
    <!-- Bootstrap Js -->
    <script src="/static/sm_assets/js/bootstrap.min.js"></script>
    <!-- Metis Menu Js -->
    <script src="/static/sm_assets/js/jquery.metisMenu.js"></script>
     <!-- DATA TABLE SCRIPTS -->
    <script src="/static/sm_assets/js/dataTables/jquery.dataTables.js"></script>
    <script src="/static/sm_assets/js/dataTables/dataTables.bootstrap.js"></script>
    <script>
        $(document).ready(function () {
            $('#dataTables-example').dataTable();
        });
        $(function () {
            $('.removeProvider').click(function () {
            $('.zhezhao').css('display', 'block');
            $('#removeProv').fadeIn();
            });
        });

        $(function () {
            $('#no').click(function () {
            $('.zhezhao').css('display', 'none');
            $('#removeProv').fadeOut();
            });
        });
        $(function () {
            $('#date').datepicker({dateFormat: "yy-mm-dd"});
        });

    </script>
         <!-- Custom Js -->
    <!-- Custom Js -->
    <script src="/static/sm_assets/js/custom-scripts.js"></script>
    <script src="/static/sm_assets/jquery-ui-datepicker/jquery-ui.min.js"></script>


</body>

</html>